package com.slz3.business.module.wmsManagement.wmsStockTransfer.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsStockTransfer.domain.WmsStockTransfer;
import com.slz3.business.module.wmsManagement.wmsStockTransfer.domain.WmsStockTransferCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsStockTransferResController extends WmsStockTransferResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, WmsStockTransfer wmsStockTransfer) {
        if (WmsStockTransferResUnsafeValid.add(req, wmsStockTransfer)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$WmsStockTransferUpdateLock(req, wmsStockTransfer);
        }
    }

    public Mono<ServerResponse> batchAdd(ServerRequest req, WmsStockTransfer wmsStockTransfer) {
        if (WmsStockTransferResUnsafeValid.batchAdd(req, wmsStockTransfer)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.batchAdd_$WmsStockTransferUpdateLock(req, wmsStockTransfer);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        if (WmsStockTransferResUnsafeValid.delete(req, wmsStockTransferCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$WmsStockTransferUpdateLock(req, wmsStockTransferCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, WmsStockTransfer wmsStockTransfer) {
        if (WmsStockTransferResUnsafeValid.modify(req, wmsStockTransfer)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$WmsStockTransferUpdateLock(req, wmsStockTransfer);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (WmsStockTransferResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return wmsStockTransferResAtomic.info_$WmsStockTransferUpdateLock(req);
        if (WmsStockTransferResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$WmsStockTransferUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (WmsStockTransferResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        //
        if (WmsStockTransferResUnsafeValid.auditSubmit(req, wmsStockTransferCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$WmsStockTransferUpdateLock(req, wmsStockTransferCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        if (WmsStockTransferResUnsafeValid.audit(req, wmsStockTransferCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$WmsStockTransferUpdateLock(req, wmsStockTransferCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        if (WmsStockTransferResUnsafeValid.auditReject(req, wmsStockTransferCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$WmsStockTransferUpdateLock(req, wmsStockTransferCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        if (WmsStockTransferResUnsafeValid.usingEnable(req, wmsStockTransferCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$WmsStockTransferUpdateLock(req, wmsStockTransferCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, WmsStockTransferCondition wmsStockTransferCondition) {
        if (WmsStockTransferResUnsafeValid.usingDisable(req, wmsStockTransferCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$WmsStockTransferUpdateLock(req, wmsStockTransferCondition);
        }
    }

}
